package com.ai.bitcoin.jpa.dao;

import com.ai.bitcoin.jpa.entity.CoinAnno2Bcc;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;
import java.util.List;

/**
 * 交易所公告
 **/
public interface CoinAnno2BccDao extends JpaRepository<CoinAnno2Bcc, String> {


    //时间范围所有BCC公告
    List<CoinAnno2Bcc> findByUpdateTimeIsBetween(Date startDate, Date endDate);

    @Query("SELECT e FROM CoinAnno2Bcc e WHERE e.synced = false ")
    Page<CoinAnno2Bcc> findAllAnno(Pageable page);
}
